<template>
  <el-input
    v-model="val"
    placeholder=""
    @change="change"
    @input="change"
  ></el-input>
</template>

<script>
export default {
  props: {
    value: String,
    type: {
      type: String,
    },
    placeholder: {
      type: String,
      default: "",
    },
  },
  data() {
    return {
      val: this.value,
    };
  },
  methods: {
    change(data) {
      this.$emit("change", {
        key: this.type,
        value: data,
      });
    },
  },
};
</script>
